
/** 表格表头 */
export const tableColumns = (t: (msg:string) => string) => [
  {
    prop: 'id',
    type: 'selection',
    label: t('table.selection'),
    width: 55,
    reserveSelection: true,
    fixed: 'left',
  },
  {
    prop: 'id',
    label: t('table.id'),
    minWidth: 100,
    fixed: 'left',
  },
  {
    prop: 'title',
    label: t('table.title'),
    minWidth: 100,
  },
  {
    prop: 'store_name',
    label: t('table.store_name'),
    minWidth: 120,
  },
  {
    prop: 'group_name',
    label: t('table.group_name'),
    minWidth: 120,
  },
  {
    prop: 'account',
    label: t('table.account'),
    minWidth: 120,
  },
  {
    prop: 'mobile',
    label: t('table.mobile'),
    minWidth: 120,
  },
  {
    prop: 'money',
    label: t('table.money'),
    minWidth: 100,
  },
  {
    prop: 'user_name',
    label: t('table.user_name'),
    minWidth: 100,
  },
  {
    prop: 'action',
    label: t('table.operation'),
    width: 250,
    showOverflowTooltip: false,
    fixed: 'right',
  },
];

/** 表格搜索表单 */
export const tableSearchFormItems = (t: (msg:string) => string) => [
  {
    attrs: {
      label: t('search.title'),
      prop: 'title',
    },
    value: '',
    component: {
      is: 'el-input',
      props: {
        placeholder: t('search.title.placeholder'),
      },
    },
  },
];
